<template>
  <div class="son">
    哥哥
    <div > 哥哥的电脑 {{ computer }}</div>
    <button @click="getFather($parent)">父亲的房产-1</button>
  </div>
</template>

<script setup lang="ts">
  import {ref} from "vue";

  const computer = ref<string>('宏碁');
  function getFather(parent : {[key: string]: any}) {
    parent.house -= 1;
  }
  defineExpose({
    computer
  })
</script>

<script lang="ts">
/**
 * @Author Rin_pu
 * @Date 2025/2/21 14:43
 * @Description son1
 * @todo
 */
export default {
  name: "son1.vue"
}
</script>

<style scoped>
.son {
  background-color: green;
  margin: auto;
  width: 80%;
  height: 40%;
}
</style>